<?php
namespace app\cms\model;
/* *
 * 前台模型
 * */
class defaults extends \app\base\model\AdminModel{

    //当前路径
    public function lists_path($pid = 0,$i = 0) {
        $condition['id'] = intval($pid);
        $result = $this->table('cms_class')->where($condition)->field('id,pid,name')->find();
        if ($result) {
            $str = $this->lists_path($result['pid'],$i);
            $str[] = array('name' => $result['name'],'url' => url('cms/default/lists',array(uid=>$result['id'])));
        }
        return $str;
    }

}